from django.db import models

# Create your models here.

class Banner(models.Model):
    poi = models.IntegerField(verbose_name='图片顺序', unique=True)
    desc = models.CharField(verbose_name='图片描述', max_length=128)
    img = models.ImageField(verbose_name='图片', upload_to='banner/')

    class Meta:
        verbose_name = '轮播图'
        verbose_name_plural = verbose_name


    def __str__(self):
        return self.desc

class Declaration(models.Model):
    about_us = models.TextField(verbose_name='首页关于我们段落')

    class Meta:
        verbose_name = '关于我们'
        verbose_name_plural = verbose_name

    def __str__(self):
        return '关于我们'

class OnlineBook(models.Model):
    name = models.CharField(verbose_name='用户姓名', max_length=128)
    phone = models.CharField(verbose_name='电话', max_length=11)
    content = models.TextField(verbose_name='留言')

